package com.ihmp.business;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ihmp.dao.FloorDao;
import com.ihmp.model.Tfloors;
@Service
@Transactional
public class FloorServiceImpl implements FloorService{

	@Autowired
	private FloorDao floorDao;
	
	@Override
	public void saveOrUpdate(Tfloors floor) {
		floorDao.saveOrUpdate(floor);
		
	}

	@Override
	public Tfloors findById(Integer id) {
		return floorDao.findById(id);
	}

	@Override
	public void delete(Tfloors floor) {
		floorDao.delete(floor);
		
	}

	@Override
	public List<Tfloors> listFloors() {
		return floorDao.listFloors();
	}

	@Override
	public List<Tfloors> getFloorsFromHotelId(Integer id) {
		return floorDao.getFloorsFromHotelId(id);
	}

}
